package org.dromara.hm.domain.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import org.dromara.common.translation.annotation.Translation;
import org.dromara.common.translation.constant.TransConstant;
import org.dromara.hm.domain.HmStock;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 库存数据视图对象 hm_stock
 *
 * @author zy Hu
 * @date 2024-12-15
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = HmStock.class)
public class HmStockVo implements Serializable
{

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 库存id
     */
    private Long stockId;

    /**
     * 产品id
     */
    private Long stockProductId;

    /**
     * 产品类型 (根据 is_commercial_product 和 is_gift_product 组合显示)
     */
    @ExcelProperty(value = "产品类型")
    @Translation(type = TransConstant.PRODUCT_ID_TO_NAME, other = "type", mapper = "stockProductId") // 修改 other 参数为 "types"
    private String productType;

    /**
     * 库存产品名称
     */
    @ExcelProperty(value = "库存产品")
    @Translation(type = TransConstant.PRODUCT_ID_TO_NAME, mapper = "stockProductId")
    private String stockProductName;

    /**
     * 库存数量
     */
    @ExcelProperty(value = "库存数量")
    private BigDecimal stockNum;

    /**
     * 库存所在门店
     */
    private Long productDept;

    /**
     * 库存所在门店名称
     */
    @ExcelProperty(value = "库存所在门店")
    @Translation(type = TransConstant.DEPT_ID_TO_NAME, mapper = "productDept")
    private String productDeptName;

    /**
     * 状态
     */
    private String status;

    /**
     * 备注
     */
    @ExcelProperty(value = "备注")
    private String remark;

}
